package com.wangyuhang.service.Impl;

import com.wangyuhang.dao.testDao;
import com.wangyuhang.service.testService;
import com.wangyuhang.vo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("testService")
public class testServiceImpl implements testService {
    @Autowired
    private testDao dao;

    @Override
    public void print() {
        dao.print();
        System.out.println("这是service层");

    }


    public int findAll() {
        int all = dao.findAll();
        return all;
    }

    @Override
    public List<User> findAllUsers() {
        return dao.findAllUsers();
    }

    @Override
    public User findUser(String name) {
        return dao.findUser(name);
    }
}
